package com.controller.backend;

import com.biz.ExamineeArrangeRecordInfoBiz;
import com.core.Result;
import com.core.ResultGenerator;
import com.entity.model.ExamineeArrangeRecordInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import tk.mybatis.mapper.entity.Condition;

import java.util.List;

/**
 * Created by jc on 2023/05/21.
 */
@Controller
@RequestMapping("/backend/security/examineeArrangeRecordInfo")
public class ExamineeArrangeRecordInfoController extends BaseController<ExamineeArrangeRecordInfo> {
    @Autowired
    private ExamineeArrangeRecordInfoBiz examineeArrangeRecordInfoBiz;

    @RequestMapping(value = "/getList")
    @ResponseBody
    public Result getList(Integer id) {
        Condition condition = new Condition(ExamineeArrangeRecordInfo.class);
        condition.createCriteria().andEqualTo("examineeArrangeRecordId", id).andEqualTo("isPay",0);
        List<ExamineeArrangeRecordInfo> examineeArranges = examineeArrangeRecordInfoBiz.findByCondition(condition);
        return ResultGenerator.genSuccessResult(examineeArranges, examineeArranges.size());
    }
}
